package com.scs.application.modules.finance.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.core.query.QueryContext;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.finance.dto.BillSettAllDTO;
import com.scs.application.modules.finance.dto.BillSettlementDTO;
import com.scs.application.modules.finance.entity.BillItem;

import java.util.List;

/**
 * <p>
 *  Service
 * </p>
 */

public interface BillItemService extends IBaseService<BillItem> {
    /**
     * 保存记帐单和结算单关系
     * @param billSettlementDTO
     * @return
     */
    void saveSettlement(BillSettlementDTO billSettlementDTO);


    /**
     * 记账单更新HRP单号
     * @param
     * @return
     */
    void updateBillItemByHrp();

    /**
     * 保存一周期内所有记帐单和结算单关系
     * @param billSettAllDTO
     * @return
     */
    void saveAllSettlement(QueryContext queryContext, BillSettAllDTO billSettAllDTO);

    /**
     * 删除记账单
     * @param billSettlementDTO
     * @return
     */
    void deleteBillAllSettlement(BillSettlementDTO billSettlementDTO);
    /**
     * 修改单据号
     */
    void updateBillItem(String id,String hrpKey,String hrpId);
    /**
     * 获取一段期间内的消耗数量
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumSkuQty(String startDate, String endDate);

    /**
     * 获取一段期间内的消耗金额
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumAmount(String startDate, String endDate);

    /**
     * @Description：消耗清单专用  page
     */
    IPage billInPage(QueryContext context);

    /**
     * @Description：消耗清单专用  list
     */
    List<BillItem> billInList(QueryContext context);
}
